package com.example.admin.common.util;

import com.example.admin.entity.SysUser;

public class UserContext {
    private static final ThreadLocal<SysUser> userHolder = new ThreadLocal<>();

    public static void setUser(SysUser user) {
        userHolder.set(user);
    }

    public static SysUser getUser() {
        return userHolder.get();
    }

    public static void removeUser() {
        userHolder.remove();
    }
} 